<template>
    <div>
        <el-form :inline="true" class="demo-form-inline">
            <el-form-item>
                <el-button type="primary" size="mini" icon="el-icon-search" @click="searchFn">搜索</el-button>
                <el-button icon="el-icon-refresh" size="mini" @click="ResetFn">重置</el-button>
            </el-form-item>
        </el-form>
        <el-table :data="tableData" style="width: 100%">
            <el-table-column prop="serviceItemName" label="套餐名称" align="center">
            </el-table-column>
            <el-table-column prop="serviceItemPrice" label="套餐价格" align="center">
            </el-table-column>
            <el-table-column prop="serviceItemInfo" label="套餐备注" show-overflow-tooltip width="128" align="center">
            </el-table-column> 
            <el-table-column prop="createTime" label="创建时间" width="180" align="center">
                <template #default="{ row }">
                    {{ row.createTime | dateFormat }}
                </template>
            </el-table-column>
            <el-table-column prop="statisticalAmount" label="状态" align="center">
                <template #default="{ row }">
                    {{ row.status == 0 ? '审核中' : ( row.status == 1 ? '审核拒绝' : ( row.status == 2 ? '审核通过' : (row.status == 3?'审核撤销':''))) }}
                </template>
            </el-table-column>
            <el-table-column label="操作" align="center" width="218">
            </el-table-column>

        </el-table>
    </div>
</template>

<script>
import {todoAPI} from "@/API/hbaip/api";
    export default {
        data(){
            return{
                tableData:[],
                pageNum: 1,
                pageSize: 10,
            }
        },
        created(){
       this.getTodo()
        },
        methods:{
        // 重置
            ResetFn() {
        
        },
            // 搜索
            searchFn(){
            
},
        async getTodo() {
            let res = await todoAPI({
                pageNum: this.pageNum,
                pageSize: this.pageSize,
            })
            this.tableData = res.rows
        }
        }
    }
</script>

<style lang="less" scoped>
/deep/ .el-date-editor{
    width: 240px;
}
/deep/ .el-select{
    width: 176px;
}
/deep/ .el-table .el-table__header-wrapper th {
            background-color: #f8f8f9;
            color: #515a6e;
            height: 40px;
            font-size: 13px;
            font-weight: 700;
        }

 .page {
        padding: 20px;
        display: flex;
        justify-content: flex-end;
        }
</style>